<?php
class Zend_View_Helper_LoadSkin extends Zend_View_Helper_Abstract{
	public function loadSkin($skin){
		//load config file
		$xml='templates/cms/'.$skin.'/default.xml';
		$skinData = new Zend_Config_Xml($xml);
		$stylesheets=$skinData->stylesheets->stylesheet->toArray();
		//
		if(is_array($stylesheets)){
			foreach ($stylesheets as $stylesheet){
				$this->view->headLink()->appendStylesheet($this->view->baseUrl().'/templates/cms/'.$skin.'/css/'.$stylesheet);
			}
		}
	}
	
}